<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login and Register Page</title>
<style>
  body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
  }
  .container {
    max-width: 600px;
    margin: 50px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  }
  h2 {
    text-align: center;
    margin-bottom: 20px;
  }
  form {
    display: flex;
    flex-direction: column;
  }
  .form-group {
    margin-bottom: 15px;
  }
  .form-group label {
    display: block;
    margin-bottom: 5px;
  }
  .form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
  }
  .form-group button {
    padding: 10px;
    border: none;
    border-radius: 4px;
    background-color: #5cb85c;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  .form-group button:hover {
    background-color: #4cae4c;
  }
  .form-group a {
    display: block;
    text-align: center;
    margin-top: 10px;
    color: #337ab7;
    text-decoration: none;
  }
  .form-group a:hover {
    text-decoration: underline;
  }
</style>
</head>
<body>
<div class="container">
  <h2>登录</h2>
  <form id="loginForm">
    <div class="form-group">
      <label for="loginEmail">邮箱</label>
      <input type="email" id="loginEmail" required>
    </div>
    <div class="form-group">
      <label for="loginPassword">密码</label>
      <input type="password" id="loginPassword" required>
    </div>
    <div class="form-group">
      <button type="submit">登录</button>
    </div>
  </form>

  <h2>注册</h2>
  <form id="registerForm">
    <div class="form-group">
      <label for="registerEmail">邮箱</label>
      <input type="email" id="registerEmail" required>
    </div>
    <div class="form-group">
      <label for="registerPassword">密码</label>
      <input type="password" id="registerPassword" required>
    </div>
    <div class="form-group">
      <label for="registerConfirmPassword">确认密码</label>
      <input type="password" id="registerConfirmPassword" required>
    </div>
    <div class="form-group">
      <button type="submit">注册</button>
    </div>
  </form>
</div>

<script>
  document.getElementById('loginForm').addEventListener('submit', function(event) {
    event.preventDefault();
    alert('Login submitted!');
  });

  document.getElementById('registerForm').addEventListener('submit', function(event) {
    event.preventDefault();
    alert('Registration submitted!');
  });
</script>
</body>
</html>